<?php

use App\Http\Controllers\Auth\DashboardController;
use App\Http\Controllers\Auth\GuestController;
use App\Http\Controllers\Auth\QrCodeController;
use App\Http\Controllers\Trademark\ContractCreation;

// 会员
Route::prefix('auth')->group(function () {
    Route::post('login', [GuestController::class, 'login'])->name('login');

    Route::controller(GuestController::class)->name('auth.')->group(function () {
        Route::post('register', 'register')->name('register');
        Route::post('logout', 'logout')->middleware('auth:user')->name('logout');
    });

    Route::controller(QrCodeController::class)->name('auth.')->group(function () {
        Route::get('qrcode', 'index')->name('qrcode');
    });

    // 合同生成
    Route::controller(ContractCreation::class)->name('trademark.')->group(function () {
        Route::post('contract-creation', 'store')->name('contract_creation');
    });

    // 会员中心
    Route::middleware('auth:user')->prefix('center')->name('center.')->group(function () {

        Route::get('dashboard', [DashboardController::class, 'index'])->name('dashboard.index');
    });

});

// 管理
